﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace Xiaov.SmartWeb.Model.Statistical
{
    public class XmlHeaderCaption
    {
        public string NodeName { get; set; }

        public string NodeComment { get; set; }


        public List<XmlHeaderCaption> GetList(string xmlPath)
        {
            List<XmlHeaderCaption> list = new List<XmlHeaderCaption>();
            XmlDocument docXml = new XmlDocument();
            docXml.Load(System.Web.HttpContext.Current.Server.MapPath(xmlPath));
            XmlElement root = docXml.DocumentElement;
            foreach (XmlNode xn in root.ChildNodes)
            {
                XmlHeaderCaption xhc = new XmlHeaderCaption();
                xhc.NodeName = xn.Name;
                list.Add(xhc);
            }
            return list;
        }
        
    }
}
